{% extends 'LimsMainBundle::Layout/formLayout.html.twig' %}

{% block stylesheets %}
    {{ parent() }}
    <link href="/template/css/lims/newCitizen.css" rel=stylesheet type=text/css />
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script type=text/javascript src="/template/js/lims/newCitizen.js"></script>
{% endblock %}

{% block content %}

    {% include 'LimsMainBundle::Breadcrumb/breadcrumb.html.twig' with {'breadCrumbName' : 'Зээлдэгч иргэн'} %} 
    <form action="{{path('lims_debtor_create_citizen')}}" method="post" name="create_citizen">
    <div class=row> 

        <div class="col-md-12" id="citizen_form_container"> 
            
                <div class=block> 
                    <div class=header> <h2>Зээлдэгч иргэний мэдээлэл</h2> 
                    </div> 
                    <div class="content controls"> 

                        <div class="form-row"> 
                            <div class="col-md-3">Ургын овог : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="form-control" name="citizen_family_name" tabindex="1"/>
                            </div> 
                        </div>

                        <div class="form-row"> 
                            <div class="col-md-3">Эцэг /эх/-ийн нэр : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="form-control" name="citizen_last_name" id="citizen_last_name" tabindex="2"/>
                            </div> 
                        </div>

                        <div class="form-row"> 
                            <div class="col-md-3">Өөрийн нэр : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="form-control" name="citizen_first_name" id="citizen_first_name" tabindex="3"/>
                            </div> 
                        </div>

                        <div class="form-row"> 
                            <div class="col-md-3">Регистрийн дугаар : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="validate[required,minSize[10],maxSize[10]] form-control" maxlength="10" name="citizen_register_number" id="citizen_register_number" tabindex="4" style="text-transform:uppercase"/>
                            </div> 
                        </div>
                        
                        <div class="form-row"> 
                            <div class="col-md-3">Гэрэлсэн эсэх:</div> 
                            <div class="col-md-9"> 
                                <div class=checkbox-inline> 
                                    <label> <input type="radio" class="validate[required]" tabindex="8" value="1" name="citizen_is_married" id="citizen_is_married_yes"/> Тийм </label> 
                                </div> 
                                <div class=checkbox-inline> 
                                    <label> <input type="radio" class="validate[required]" tabindex="9" value="0" name="citizen_is_married" id="citizen_is_married_no"/> Үгүй </label> 
                                </div> 
                            </div>
                        </div>
                    </div>
                </div>

                <div class=block> 
                    <div class=header> <h2>Хаягын мэдээлэл</h2> 
                    </div> 
                    <div class="content controls"> 

                        <div class="form-row"> 
                            <div class="col-md-3">Аймаг / Нийслэл : </div> 
                            <div class="col-md-9"> 
                                <select class="select2" style="width:100%" tabindex="10" name="citizen_address_1" id="citizen_address_1"> 
                                    <option value="">Сонгох</option>
                                    {% for aimagDuureg in aimagDuuregList %}
                                        <option value="{{aimagDuureg.id}}">{{aimagDuureg.name}}</option>
                                    {% endfor %}
                                </select>
                            </div> 
                        </div>

                        <div class="form-row"> 
                            <div class="col-md-3">Сум/Дүүрэг : </div> 
                            <div class="col-md-9"> 
                                <select class="select2" style="width:100%" tabindex="11" name="citizen_address_2" id="citizen_address_2"> 
                                    <option value="">Сонгох</option>
                                    {% for sumKhoroo in sumKhorooList %}
                                        <option value="{{sumKhoroo.id}}">{{sumKhoroo.name}}</option>
                                    {% endfor %}
                                </select>
                            </div> 
                        </div>
                        
                        <div class="form-row"> 
                              <div class="col-md-3">Хаяг:</div> 
                              <div class="col-md-9"><textarea class="form-control" tabindex="12" name="citizen_address_full" id="citizen_address_full"></textarea>
                              </div> 
                        </div>
                                
                        <div class="form-row"> 
                            <div class="col-md-3">Утас : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="form-control" name="citizen_phone[]" id="citizen_phone_1" tabindex="3"/>
                            </div> 
                        </div>
                                
                        <div class="form-row"> 
                            <div class="col-md-3">Имэйл : </div> 
                            <div class="col-md-9"> 
                                <input type=text class="form-control" name="citizen_email[]" id="citizen_email_1" tabindex="3"/>
                            </div> 
                        </div>
                    </div>
                </div>

                <div class=block> 
                    <div class=header> <h2>Ажлын мэдээлэл</h2> 
                    </div> 
                    <div class="content controls"> 
                        <div class="form-row"> 
                            <div class="col-md-3">Ажил эрхэлдэг эсэх :</div> 
                            <div class="col-md-9"> 
                                <div class=checkbox-inline> 
                                    <label> <input type="radio" class="validate[required]" tabindex="13" value="1" name="citizen_has_job" id="citizen_has_job_yes"/> Тийм </label> 
                                </div> 
                                <div class=checkbox-inline> 
                                    <label> <input type="radio" class="validate[required]" tabindex="14" value="0" name="citizen_has_job" id="citizen_has_job_no" checked="checked"/> Үгүй </label> 
                                </div> 
                            </div>
                        </div>
                        
                        <div id="job_section" style="display: none;">
                            <div class="form-row"> 
                                <div class="col-md-3">Албан тушаалын төрөл : </div> 
                                <div class="col-md-9"> 
                                    <select class="select2" style="width:100%" tabindex="11" name="citizen_job_position_id" id="citizen_job_position_id"> 
                                        <option value="">Сонгох</option>
                                        {% for position in jobPositionList %}
                                            <option value="{{position.ID}}">{{position.NAME}}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                                
                            <div class="form-row"> 
                                <div class="col-md-3">Албан тушаалын нэр : </div> 
                                <div class="col-md-9"> 
                                    <input type=text class="form-control" name="citizen_job_name" id="citizen_job_name" tabindex="3"/>
                                </div> 
                            </div>

                            <div class="form-row"> 
                                  <div class="col-md-3">Ажлын хаяг:</div> 
                                  <div class="col-md-9"><textarea class="form-control" tabindex="15" name="citizen_job_address" id="citizen_job_address"></textarea>
                                  </div> 
                            </div>

                            <div class="form-row"> 
                                <div class="col-md-3">Ажлын утас:</div> 
                                <div class="col-md-9"> 
                                    <input type="text" class="col-md-4" class="form-control" tabindex="16" name="citizen_job_phone_number" id="citizen_job_phone_number"/> 
                                </div> 
                            </div> 

                            <div class="form-row"> 
                                <div class="col-md-3">Ажлын и-мэйл:</div> 
                                <div class="col-md-9"> 
                                    <input type="email" class="col-md-4" class="validate[required,equals[email]] form-control" tabindex="12" name="citizen_job_email" id="citizen_job_email"/>
                                </div> 
                            </div> 
                                
                        </div>
                    </div>
                </div>
        </div>
        {#<div class="col-md-2 closed" id="citizen_form_right_container">
            
            <div class="block">
                <div class="content controls"> 
                    <div class="form-row">                         
                        <div class="col-md-12"> 
                            <div>
                                <div class=header> <h2><a href="javascript: addCreditOnCitizen();">Зээлийн нэмэх <span class="icon-plus-sign"></span></a></h2></div>                                
                            </div> 
                        </div>
                    </div>
                </div>
            </div>
        </div>#}
        
    </div> 
    <div class="row">
        <div class=footer> 
            <div class="side"> 
                <div class="btn-group margin-left-10"> 
{#                    <button class="btn btn-default" type=button onClick="$('#validate').validationEngine('hide')">Hide prompts</button> #}
                    <button class="btn btn-success" name="save" value="1" type=submit>Хадгалах</button> 
                </div> 
            </div> 
        </div> 
    </div>
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
</form> 
</div> 

</div>
{% endblock %}